import axios from './http'

export default {
  // 1.删除文章分类
  delCategory(data){
    return axios.post('/article/delCategory', data)
  },
  
  // 2.添加，修改文章分类
  articleAdd(data) {
    return axios.post('/article/category', data)
  },
  // 3.获取文章分类
  getCategorys(page, pageSize) {
    return axios.get('/article/getCategorys')
  },
  // 4.获取文章列表数据
  getartList(category_id,title,page, pageSize) {
    return axios.get('/article/getList?category_id='+category_id+'&title='+title+'&page='+page+'&pageSize='+pageSize)
  },
  // 5.添加修改文章
  articleList(data) {
    return axios.post('/article/article', data)
  },
  // 6.删除文章
  articleListDel(data) {
    return axios.post('/article/delArticle', data)
  },
  // 7.获取文章详情
  articleGetInfo(data) {
    return axios.get('/article/getInfo?id='+data)
  },
}